<?php
class Specificant extends Eloquent {
	protected $table = 'specificant';
	
	const OPTION_TEXT = 0;
	const OPTION_SELECT = 1;
	const OPTION_CHECKBOX = 2;
	const OPTION_RADIO = 3;

	public $timestamps = false;
	public static function getTypeText($type)
	{
		$textes = array(
			'单行文本', '下拉列表', '多选按钮', '单选按钮'	
		);
		return isset($textes[$type]) ? $textes[$type] : '未知';
	}
	
	public function options()
	{
		return $this->hasMany('SpecOption');
	}
	
}